﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Boom.Navigation
{
    public class Background:DrawableGameComponent
    {
        Texture2D _Texture;
        SpriteBatch _SBatch;
        Rectangle _Rect;

        public Background(Game Mygame, ref Texture2D Texture)
            : base(Mygame)
        {
            _Texture = Texture;
            _SBatch = (SpriteBatch)Mygame.Services.GetService(typeof(SpriteBatch));
            _Rect = new Rectangle(0, 0, Texture.Width, Texture.Height);
        }

        public override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);
            _SBatch.Draw(_Texture, _Rect, Color.White);
        }
    }
}
